#!/usr/bin/env ./jshost


(function(){

	var x=new Object();

	
	(function(){
		x.ar=new Array();
		x.ar[5000] = new Function("", "alert('ZZZ'+5000)");
		x.ar[1000] = function(){alert('XXX'+1000)};
	})();

	setTimeout(x.ar[1000], 3000);
	setTimeout(x.ar[5000], 4000);
//	setTimeout(function(){alert(123)}, 3000);

	sleep(200);	

	x.ar=undefined;
	gc();
/*
	delete x.ar[1000];
	sleep(100);
	delete x.ar;
	sleep(100);
	x.ar=new Array();
	var i;

	gc();


	for(i=0;i<100000;++i)
		x.ar.push(i+"oijsdoi sjdf oisjdfo ijdfoiwjer wekdjshdfjk haskjdn aksjdnwkje njkweb");
	
	gc();
	sleep(100);
	maybegc();
	sleep(100);
*/	
	
	alert("loop");
	sleep(1000*1000);

})();


